cmake_minimum_required(VERSION 3.22)
project(target_include_test)

add_subdirectory(test)

add_executable(main main.cpp)
#target_include_directories(main PRIVATE test)
get_property(dirs_interface TARGET main PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(dirs_normal TARGET main PROPERTY INCLUDE_DIRECTORIES)
message("# In parent scope, target main property: interface[${dirs_interface}], normal[${dirs_normal}]")

target_link_libraries(main test)
get_property(dirs_interface TARGET main PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(dirs_normal TARGET main PROPERTY INCLUDE_DIRECTORIES)
message("# In parent scope, after add test lib, target main property: interface[${dirs_interface}], normal[${dirs_normal}]")
 